package edu.xidian.bdilab.jrbigdata.controller.admin;

import edu.xidian.bdilab.jrbigdata.controller.response.ResponseResult;
import edu.xidian.bdilab.jrbigdata.service.admin.adminlogin.AdminLoginService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = {"adminlogin-管理员登录功能"})
public class AminLoginController {


    @Autowired
    AdminLoginService adminLoginService;

    @RequestMapping(value = "admin/login", method = RequestMethod.POST)
    public ResponseResult login(@RequestParam String userName,
                                @RequestParam String password)throws Exception{
        ResponseResult responseResult=adminLoginService.adminLogin(userName,password);
        return responseResult;
    }

}
